package com.bigknow.appstore.web.base.controller;

import com.bigknow.appstore.web.base.entity.Dict;
import com.bigknow.appstore.web.base.service.IDictService;
import com.bigknow.appstore.web.framework.controller.AbstractRestController;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by TwelveFoldEr on 2016/3/14.
 */
@RestController
@RequestMapping(value = "/base/dict")
public class DictController extends AbstractRestController<Dict,IDictService> {

    @Override
    protected String getBasePath() {
        return "/base";
    }

    @Override
    protected String getBaseName() {
        return "dict";
    }

    @RequestMapping(value = "/rest/findByGroup/{group}", method = RequestMethod.GET)
    public List<Dict> findByGroup(@PathVariable String group) {
        return service.findByGroup(group);
    }

}
